package eventmanager.backend;

import org.joda.time.DateTime;

public class Time {
	
	private int month, day, year, hour, min, sec;
	private String stringDate, stringTime;
	private DateTime dt;
	
	private String testDate(){
		
		dt = new DateTime();
		month = dt.getMonthOfYear();
		day = dt.getDayOfMonth();
		year = dt.getYear();
		stringDate = (month + "/" + day + "/" + year); //prints 9/12/2012
		return stringDate;
	}
	
	private String testTime(){
		
		dt = new DateTime();
		hour = dt.getHourOfDay();
		min = dt.getMinuteOfHour();
		sec = dt.getSecondOfMinute();
		stringTime = (hour + ":" + min + ":" + sec);
		return stringTime;
	}
	
	public int getHour() {
		return hour;
	}

	public int setHour(){
		dt = new DateTime();
		hour = dt.getHourOfDay();
		return hour;
	}
	
	public int setMin(){
		dt = new DateTime();
		min = dt.getMinuteOfHour();
		return min;
	}

	public int getMin() {
		return min;
	}

	

	public static void main(String[] args){
		Time t = new Time();
		System.out.println("Date: " + t.testDate());
		System.out.println("Time: " + t.testTime());
		System.out.println("Hour: " + t.setHour());
		System.out.println("Min: " + t.setMin());
	}

}
